package com.wangxinyuchuan.demo.builder;

/**
 * @author wangxinyuchuan
 * @date 2023/4/16 4:30 PM
 */
public class Main {
    public static void main(String[] args) {
        TextBuilder textBuilder = new TextBuilder();
        Director director = new Director(textBuilder);
        // Director类中进行构建
        director.construct();
        System.out.println(textBuilder.getResult());

        HTMLBuilder htmlBuilder = new HTMLBuilder();
        director = new Director(htmlBuilder);
        // 执行construct方法后会在根目录下生成Greeting.html文件
        director.construct();
        System.out.println(htmlBuilder.getResult());
    }
}
